1.1 Here is a simple class-but with method specifications instead of method definitions-to find the highest age from the ages scanned in:
public class Age
{
protected int highestAge;
/**
* Initializes this Age object.
*
*/
public Age ()
/**
* Returns the highest age of the ages scanned in from the keyboard.
* The sentinel is -1.
*
* @param sc - The Scanner used to scan in the ages.
*
* @return the highest age of the ages scanned in from sc.
*
*/
public int findHighestAge (Scanner sc)
} // class Age
a. Fill in the method definitions for the Age class.
b. Test your Age class by developing a project and running the project.
 
 
View Solution
 
 
 
  Next >>